'use strict';

const foodController = require('../../app/controller/food.controller.js');

module.exports = function(app) {
    app.route('/food/addFood')
        .post(foodController.addFood);

    app.route('/food/deleteFood/:_id')
        .get(foodController.deleteFood);

    app.route('/food/updateFood')
        .post(foodController.updateFood);
    
    app.route('/food/getFoodByFname/:fname')
        .get(foodController.getFoodByFname);

    app.route('/food/getFoodByIcnum/:icnum')
        .get(foodController.getFoodByIcnum);

    app.route('/food/getFoodByFtype/:ftype')
        .get(foodController.getFoodByFtype);

    app.route('/food/getFoodByIcnumFtype')
        .post(foodController.getFoodByIcnumFtype);

    app.route('/food/getFoodById/:_id')
        .get(foodController.getFoodById);
};